# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-hammertime-http
_pkgname=HammerTime-http
pkgver=0.11.1
pkgrel=1
pkgdesc='An HTTP client library aiming to perform a large number of requests on a server as fast as it can take them, but without distrupting operations significantly.'
url='https://pypi.org/project/HammerTime-http/#files'
arch=('any')
license=('GPL-2.0-only')
depends=('python' 'python-aiohttp' 'python-easyinject' 'python-aiodns'
         'python-simhash' 'python-forkedsimhash-py' 'python-marshmallow-har'
         'python-marshmallow-autoschema')
makedepends=('python-build' 'python-pip' 'python-wheel')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('c8c48d588fa4f53e56c8f090e1f866da4a69f25caf5004a25bd0107dd4183a0c686a3c20b4c383205ebcef5e8bc629a7f69aa58fde76155c314ae84c78cb57a8')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

